import {createRouter, createWebHistory} from "vue-router";
import HomePageView from "../views/HomePageView.vue";

const NiceGoodsView = () => import("../views/NiceGoodsView.vue")
const InformationView = () => import("../views/InformationView.vue")
const ShoppingCartView = () => import("../views/ShoppingCartView.vue")
const MyMessageView = () => import("../views/MyMeassageView.vue")
const SearchView = () => import("../views/SearchView.vue")
const WaiMaiWch = () => import('../views/TakeOutFoodWch/WaiMaiWch.vue')
const MerchantView = () => import("../views/MerchantView.vue")
const CollectionView = () => import ('../views/CollectionView.vue')
const VIPView = () => import('../views/TakeOutFoodWch/VIPView.vue')
const OrderView = () => import('../views/TakeOutFoodWch/OrderView.vue')
const XiaoXiWch = () => import('../components/TakeOutFoodWch/TopWch/XiaoXiWch.vue')
const FruitVegetableView = () => import("../views/FruitVegetableView.vue")
const HuiYuanWch = () => import('../components/TakeOutFoodWch/VIP/HuiYuanWch.vue')

<<<<<<< HEAD

=======
>>>>>>> 3ec4e68ee99058a6be65f4d028989634d5d619c7
const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: "/",
            name: "homepageview",
            component: HomePageView,
        },
        {
            path: "/nice-goods-view",
            name: "nicegoodsview",
            component: NiceGoodsView
        },
        {
            path: "/information-view",
            name: "informationview",
            component: InformationView
        },
        {
            path: "/shopping-cart-view",
            name: "shoppingcartview",
            component: ShoppingCartView
        },
        {
            path: '/collection-view',
            name: 'collection',
            component: CollectionView
        },
        {
            path: "/my-message-view",
            name: "mymessageview",
            component: MyMessageView
        },
        {
            path: "/search-view",
            name: "searchview",
            component: SearchView
        },
        {
            path: "/merchant-view",
            name: "merchantview",
            component: MerchantView
        },
        {
            path: "/fruit-vegetable-view",
            name: "fruitvegetableview",
            component: FruitVegetableView
        },
        {
<<<<<<< HEAD
            path: '/waimai-view',
            name: "waimaiview",
            component: WaiMaiWch,
            children: [
                {
                    path: '/order-view',
                    name: 'order',
                    component: OrderView
                },

                {
                    path: '/vip-view',
                    name: 'vip',
                    component: VIPView
                },
                {
                    path: '/xiaoxi-wch',
                    name: 'xiaoxiwch',
                    component: XiaoXiWch
                },
                {
                    path: '/huiyuan-wch',
                    name: 'huiyuan',
                    component: HuiYuanWch
                }
            ],
        }]
=======
            path: '/waimai-view',
            name: "waimaiview",
            component: WaiMaiWch,
        }, {
            path: '/order-view',
            name: 'order',
            component: OrderView
        }, {
            path: '/waimai-view',
            name: "waimaiview",
            component: WaiMaiWch,
        },
        {
            path: '/vip-view',
            name: 'vip',
            component: VIPView
        },
        {
            path: '/xiaoxi-wch',
            name: 'xiaoxiwch',
            component: XiaoXiWch
        },
        {
            path: '/huiyuan-wch',
            name: 'huiyuan',
            component: HuiYuanWch
        }],

    scrollBehavior(to, from, savePosition) {
        return {y: 0}
    }
>>>>>>> 3ec4e68ee99058a6be65f4d028989634d5d619c7
})

export default router
